package com.rightsidetech.activity.dto.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @Author: yhr
 * @Date: 2021-12-21 14:26
 */
@Data
public class ActCouponBaseSaveReq implements Serializable {
    @ApiModelProperty(value = "基础优惠券名称",required = true)
    @NotBlank(message = "基础优惠券不能为空")
    @Length(max = 20,message = "基础优惠券名称长度过长")
    private String couponName;
    @ApiModelProperty(value = "优惠券类型(0折扣 1满减)",required = true)
    @NotNull(message = "优惠券类型不能为空")
    @Range(min = 0, max = 1, message = "优惠券类型不合法")
    private Byte couponType;
    @ApiModelProperty(value = "优惠卷 金额/折扣额度",required = true)
    @NotNull(message = "优惠卷金额不能为空")
    @Min(value = 0,message = "优惠卷金额不合法")
    @Max(value = 999999999,message = "优惠券金额数值过大")
    private BigDecimal amount;

}
